-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for ipyvolume viewer issues #456
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #456 +/- ##
==========================================
+ Coverage 86.04% 86.05% +0.01%
==========================================
Files 90 90
Lines 5223 5229 +6
==========================================
+ Hits 4494 4500 +6
Misses 729 729 ☔ View full report in Codecov by Sentry. |
Indeed, that was my worry as well. |
Turns out that the scatter viewer does work, albeit with some issues with particular glue components - see #449 (comment). After making similar changes to the scatter viewer as well, the display is now looking the same for me using either the ipyvolume scatter or the vispy scatter viewers. |
@maartenbreddels and I had a brief discussion about the scatter issues at today's glue meeting and decided that the best thing to do is to make sure that we pass floats to the ipyvolume scatter. This PR was already manipulating the scatter widget's x/y/z values, so I decided to just add that fix here as well. It's also now easy to confirm that the axis changes here lead to a right-handed coordinate system (which is what we want). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work on this!
While Azmé and I were investigating the aspect ratio issue mentioned in #451, we noticed that currently, the displayed volume rendering in the ipyvolume viewer seems to be wrong (in particular, it doesn't match what's displayed in the vispy volume viewer). I believe this might also be a partial cause of #450.
I think this is an issue with axes. As an example, I looked at the reduced TAN C14 cube used in the astropy FITS cube tutorial here. If I open this in vispy, I get
but with the current ipyvolume viewer I get
which is what led me to believe that the data was being passed into the ipyvolume widget incorrectly. After rearranging the axes as is done in this PR (note that
np.transpose
returns a view if possible, so we shouldn't need to worry about data getting copied), we getThis also fixes #451 for me, in that using the native aspect ratio now behaves the same as it does in vispy.
It's hard to tell how the changes to the ipyvolume viewer code affect the 3D scatter viewer since as #449 points out, it isn't working right now. Only thing I can check is that with these changes, the x/y/z labels indicate that it has a right-handed z-up coordinate system, so that's good.